import { Icon } from './Icon';
import { LngLat } from './LngLat';
import { TMapInstance } from './Map';
import { Point } from './Point';

export interface InfoWindowOptions {
    minWidth?: number;
    maxWidth?: number;
    maxHeight?: number;
    autoPan?: boolean;
    closeButton?: boolean;
    offset?: Point;
    autoPanPadding?: Point;
    closeOnClick?: boolean;
}

export interface InfoWindowConstructor {
    new(content: string|HTMLElement, opts?: InfoWindowOptions): InfoWindow;
  }

export interface InfoWindow {
    getType(): number;
    setLngLat(lnglat: LngLat);
    getLngLat(): LngLat;
    setOffset(num: Point): void;
    getOffset(): Point;
    isOpen(): boolean;
    setContent(content: String|HTMLElement): void;
    getContent(): String|HTMLElement;
    update(): void;
    closeInfoWindow();

    addEventListener(event: string, handler: (e: any) => void);
    removeEventListener(event: string, handler: () => void);
}
